<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Whisper: simplefile_protocol_engine.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Whisper
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">simplefile_protocol_engine.h</div>  </div>
</div>
<div class="contents">
<a href="simplefile__protocol__engine_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef __SIMPLEFILE_PROTOCOL_ENGINE_H__</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define __SIMPLEFILE_PROTOCOL_ENGINE_H__ 1</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &lt;fstream&gt;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="preprocessor">#include &quot;<a class="code" href="types_8h.html">types.h</a>&quot;</span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="stegio_8h.html">stegio.h</a>&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;<a class="code" href="properties__reader_8h.html">properties_reader.h</a>&quot;</span>
<a name="l00010"></a>00010 
<a name="l00011"></a><a class="code" href="simplefile__protocol__engine_8h.html#a7cbe2e306329942f7e5151c07b10c8ec">00011</a> <span class="preprocessor">#define LENGTH_FIELD_LENGTH 4</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 
<a name="l00023"></a><a class="code" href="classCSimplefileProtocolEngine.html">00023</a> <span class="keyword">class </span><a class="code" href="classCSimplefileProtocolEngine.html" title="simple protocol engine for transmission of file payload">CSimplefileProtocolEngine</a> : <span class="keyword">public</span> <a class="code" href="classIStegIO.html" title="abstraction layer of a steg payload data source and sink">IStegIO</a>
<a name="l00024"></a>00024 {
<a name="l00025"></a>00025 <span class="keyword">public</span>:
<a name="l00026"></a>00026 
<a name="l00031"></a>00031         <a class="code" href="classCSimplefileProtocolEngine.html#a03a82080927fd9b50b6636088249cca0">CSimplefileProtocolEngine</a>(<a class="code" href="properties__reader_8h.html#a67847fd00cb49d80dd45f61722eb9a43">CPropertiesReader</a>* pConfig);
<a name="l00032"></a>00032         <span class="keyword">virtual</span> <a class="code" href="classCSimplefileProtocolEngine.html#a0c476b07a8e2127325f0746338f3ad39">~CSimplefileProtocolEngine</a>();
<a name="l00033"></a>00033 
<a name="l00034"></a>00034         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classCSimplefileProtocolEngine.html#a403162f9a438c68d3bed084e1d8e10c2">open</a>();
<a name="l00035"></a>00035         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCSimplefileProtocolEngine.html#a365d02c3dcdd59470d728eb6c950c896">close</a>();
<a name="l00036"></a>00036         <span class="keyword">virtual</span> <a class="code" href="namespaceNStegIO.html#a7e327c93e6134904ec18fdd7e7a72e80">NStegIO::EReadState</a> <a class="code" href="classCSimplefileProtocolEngine.html#af1cd3bf438222a5b9bce6859c605f5e6">read</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>&amp; pByte);
<a name="l00037"></a>00037         <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCSimplefileProtocolEngine.html#a9c5c5c10645b1767b6a8f92ca719f8bd">write</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> pByte);
<a name="l00038"></a>00038         <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classCSimplefileProtocolEngine.html#a82ca824be5ed0a57bc8a709c9cabafa0" title="get size of available bytes which can be read with the read methode. For example: If this methode ret...">available</a>();
<a name="l00039"></a>00039 
<a name="l00040"></a><a class="code" href="classCSimplefileProtocolEngine.html#a596709bbe09e3fb8e7f1f2fccd6b8e36">00040</a>         <span class="keyword">static</span> <span class="keyword">const</span> std::string <a class="code" href="classCSimplefileProtocolEngine.html#a596709bbe09e3fb8e7f1f2fccd6b8e36">sDefaultReadFilename</a>;
<a name="l00041"></a><a class="code" href="classCSimplefileProtocolEngine.html#a60987ca5b20ca568fed79efe1bc79bd9">00041</a>         <span class="keyword">static</span> <span class="keyword">const</span> std::string <a class="code" href="classCSimplefileProtocolEngine.html#a60987ca5b20ca568fed79efe1bc79bd9">sDefaultWriteFilename</a>;
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">private</span>:
<a name="l00044"></a>00044         <a class="code" href="classCSimplefileProtocolEngine.html#a03a82080927fd9b50b6636088249cca0">CSimplefileProtocolEngine</a>();
<a name="l00045"></a>00045         <a class="code" href="classCSimplefileProtocolEngine.html#a03a82080927fd9b50b6636088249cca0">CSimplefileProtocolEngine</a>(<span class="keyword">const</span> <a class="code" href="classCSimplefileProtocolEngine.html" title="simple protocol engine for transmission of file payload">CSimplefileProtocolEngine</a>&amp; );
<a name="l00046"></a>00046         <a class="code" href="classCSimplefileProtocolEngine.html" title="simple protocol engine for transmission of file payload">CSimplefileProtocolEngine</a>&amp; <a class="code" href="classCSimplefileProtocolEngine.html#a33875734b5ef2a08e5e622a537c1156a">operator=</a>(<span class="keyword">const</span> <a class="code" href="classCSimplefileProtocolEngine.html" title="simple protocol engine for transmission of file payload">CSimplefileProtocolEngine</a>&amp; );
<a name="l00047"></a>00047 
<a name="l00048"></a><a class="code" href="classCSimplefileProtocolEngine.html#a7ec14103ba0a9de83ff88e8b8aa1b32a">00048</a>         <span class="keyword">static</span> <span class="keyword">const</span> std::string <a class="code" href="classCSimplefileProtocolEngine.html#a7ec14103ba0a9de83ff88e8b8aa1b32a">sIniSectionName</a>;
<a name="l00049"></a>00049 
<a name="l00050"></a><a class="code" href="classCSimplefileProtocolEngine.html#a72c17fb4fa3972c9d65dbadec3dc55f7">00050</a>         <a class="code" href="properties__reader_8h.html#a67847fd00cb49d80dd45f61722eb9a43">CPropertiesReader</a>* <a class="code" href="classCSimplefileProtocolEngine.html#a72c17fb4fa3972c9d65dbadec3dc55f7">mConfig</a>;
<a name="l00051"></a>00051 
<a name="l00052"></a><a class="code" href="classCSimplefileProtocolEngine.html#afaec05e9e7ea304ee656fca0395a17bf">00052</a>         std::string <a class="code" href="classCSimplefileProtocolEngine.html#afaec05e9e7ea304ee656fca0395a17bf">mIOFilenameRead</a>;
<a name="l00053"></a><a class="code" href="classCSimplefileProtocolEngine.html#a41ccddccb8af4994f05fcad7688786a9">00053</a>         std::string <a class="code" href="classCSimplefileProtocolEngine.html#a41ccddccb8af4994f05fcad7688786a9">mIOFilenameWrite</a>;
<a name="l00054"></a><a class="code" href="classCSimplefileProtocolEngine.html#a9f8d62d584bfaccb28818a89daa5df72">00054</a>         std::ifstream <a class="code" href="classCSimplefileProtocolEngine.html#a9f8d62d584bfaccb28818a89daa5df72">mIOStreamRead</a>;
<a name="l00055"></a><a class="code" href="classCSimplefileProtocolEngine.html#acb1d85d5484aab5aa1517c6cbaedb0a3">00055</a>         std::ofstream <a class="code" href="classCSimplefileProtocolEngine.html#acb1d85d5484aab5aa1517c6cbaedb0a3">mIOStreamWrite</a>;
<a name="l00056"></a>00056 
<a name="l00057"></a><a class="code" href="classCSimplefileProtocolEngine.html#a3ab5b4507ecf5d867b6e1c1ae84b66f1">00057</a>         <span class="keywordtype">bool</span> <a class="code" href="classCSimplefileProtocolEngine.html#a3ab5b4507ecf5d867b6e1c1ae84b66f1">mSendEof</a>;
<a name="l00058"></a>00058 };
<a name="l00059"></a>00059 
<a name="l00060"></a>00060 <span class="preprocessor">#endif // __SIMPLEFILE_PROTOCOL_ENGINE_H__</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 25 2012 22:00:39 for Whisper by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
